/** 
  Copyright (c) 2008, 2009 Claudio Imbrenda and Diego Ceccarelli
  This program is released under the terms of the
  GNU GPL version 3 or later.
*/

package macchina;

import javax.tools.*;

public class SyntaxErrorException extends Exception {
  
  private DiagnosticCollector<JavaFileObject> diag;
    
  /** Creates a new instance of SyntaxErrorException */
  public SyntaxErrorException() {
    super();
  }
  
  /** Creates a new instance of SyntaxErrorException
   * @param s error message.
   */
  public SyntaxErrorException(String s) {
    super(s);
  }

  public SyntaxErrorException(DiagnosticCollector<JavaFileObject> d){
      super(java.util.ResourceBundle.getBundle("macchina/Bundle_macchina").getString("Compilation_Error!")+"\n");
      diag=d;
  }
  
  public DiagnosticCollector<JavaFileObject> getDiagnostic(){
   return diag;   
  }
  
}
